<template>
  <a-upload-dragger
    name="file"
    :multiple="true"
    action="http://huachengcehui.top:8088/jeecg-boot/vrkrpano/img/savefile"
    @change="handleChange"
  >
    <p class="ant-upload-drag-icon">
      <a-icon type="inbox" />
    </p>
    <p class="ant-upload-text">
     单击或拖动文件到此区域进行上载
    </p>
    <p class="ant-upload-hint">
      支持单次或批量上传。
    </p>
  </a-upload-dragger>
</template>
<script>
export default {
  data() {
    return {};
  },
  methods: {
    handleChange(info) {
      const status = info.file.status;
      if (status !== 'uploading') {
        console.log(info.file, info.fileList);
      }
      if (status === 'done') {
        this.$message.success(`${info.file.name} 上传成功.`);
      } else if (status === 'error') {
        this.$message.error(`${info.file.name} 上传失败.`);
      }
    },
  },
};
</script>
